import {requestClient} from '#/api/request';

export async function findRoutes() {
    return requestClient.get('/sys/menu/routes');
}

export async function findMenuList(params) {
    return requestClient.get('/sys/menu/list', {params});
}

export async function findMenuListTree(params) {
    return requestClient.get('/sys/menu/list/tree', {params});
}

export async function createMenuInfo(data) {
    return requestClient.post('/sys/menu/create', data)
}

export async function updateMenuInfo(data) {
    return requestClient.put('/sys/menu/update', data)
}

export async function removeMenuInfo(id) {
    return requestClient.delete('/sys/menu/remove', {params: {id}})
}